package com.lc.tgxm;

import com.lc.tgxm.util.GLobalConstant;
import com.zcx.helper.app.AppPreferences;

/**
 * SP
 * Created by Administrator on 2016/3/14.
 */
public class BasePreferences extends AppPreferences {

    public BasePreferences(String name) {

        super(name);

    }

    public void saveIsGuide(boolean isGuide) {

        putBoolean("isGuide", isGuide);

    }

    public boolean readIsGuide() {

        return getBoolean("isGuide", false);

    }

    // 存储用户ID
    public void putUserId(String userid) {
        putString("userid", userid);
    }

    // 获取用户ID
    public String getUserId() {
        return getString("userid", GLobalConstant.USERID);
    }

    // 存储用户名称
    public void putUserName(String name) {
        putString("uname", name);
    }

    // 获取用户名称
    public String getUserName() {
        return getString("uname", "游客");
    }

    // 存储用户实名认证
    public void putRealname(boolean isrn) {
        putBoolean("realname", isrn);
    }

    // 获取用户实名认证
    public boolean getRealname() {
        return getBoolean("realname", false);
    }

    // 存储银行卡
    public void putBankstatus(boolean isrn) {
        putBoolean("bankstatus", isrn);
    }

    // 获取银行卡
    public boolean getBankstatus() {
        return getBoolean("bankstatus", false);
    }


}